<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>RestfulLinux: RFAPIKey.h文件参考</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">RestfulLinux
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- 制作者 Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">RFAPIKey.h文件参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>APIKey操作接口封装。  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="osDataType_8h_source.html">osAdaption/osDataType.h</a>&gt;</code><br/>
</div>
<p><a href="RFAPIKey_8h_source.html">浏览该文件的源代码。</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">APIKey信息结构体  <a href="structRFAPIKeyInfo.html#details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#af578ef1448a44667163bac36573338b8">APIKEY_TITILE_LEN_MAX</a>&#160;&#160;&#160;31</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#acc1f411996184aedde8f1a92be9bc337">APIKEY_KEY_LEN_MAX</a>&#160;&#160;&#160;63</td></tr>
<tr><td colspan="2"><div class="groupHeader">APIKey</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>API Key的操作权限，允许某项操作，则设定为对应Flag；允许多个操作，则设定为（Flag1 | Flag2）；都允许，则可以设为0xFFFF </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#a3861f1bc9f05b3121553bff99e010300">APIKEY_PERMISSION_FLAG_POST</a>&#160;&#160;&#160;0x0001</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#a59fa96f8532dba4ba7697728fb7ecc25">APIKEY_PERMISSION_FLAG_PUT</a>&#160;&#160;&#160;0x0002</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#ae675ba5273b60aff7defe5e946bf6dff">APIKEY_PERMISSION_FLAG_GET</a>&#160;&#160;&#160;0x0004</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#aa803f7fd707c28f2cc1c625a3ab98f02">APIKEY_PERMISSION_FLAG_DELETE</a>&#160;&#160;&#160;0x0008</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#a7b3ee488773fb345fbc2c626f1ee1cec">APIKEY_PERMISSION_FLAG_ALL</a>&#160;&#160;&#160;0xFFFF</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6bb440e509be2f5996df692de9392ab9"></a><!-- doxytag: member="RFAPIKey.h::pRFAPIKeyInfo" ref="a6bb440e509be2f5996df692de9392ab9" args="" -->
typedef struct <a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>pRFAPIKeyInfo</b></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#ad499d726f56189940d30eecba5e40616">RFAPIKey_Create</a> (<a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> *keyInfo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">创建APIKey  <a href="#ad499d726f56189940d30eecba5e40616"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#a00193ebdc68a1853599464426eb24f78">RFAPIKey_UpdateInfo</a> (<a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> *keyInfo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">更新APIKey信息  <a href="#a00193ebdc68a1853599464426eb24f78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#aed7a2a64fe8500884ae5be23cdd6a25d">RFAPIKey_View</a> (<a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> **keyInfoList)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">查看本设备的所有key  <a href="#aed7a2a64fe8500884ae5be23cdd6a25d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RFAPIKey_8h.html#a7337cf1558fd7a297f6943ad4aef0591">RFAPIKey_Delete</a> (int8 *targetKey)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">删除指定APIKey  <a href="#a7337cf1558fd7a297f6943ad4aef0591"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>详细描述</h2>
<div class="textblock"><p>APIKey操作接口封装。 </p>
<p>Copyright (c), 2012~2016 iot.10086.cn All Rights Reserved</p>
<dl class="author"><dt><b>作者:</b></dt><dd>宋伟&lt;<a href="mailto:songwei1@iot.chinamobile.com">songwei1@iot.chinamobile.com</a>&gt; </dd></dl>
<dl class="date"><dt><b>日期:</b></dt><dd>2016/05/25 </dd></dl>
<dl class="version"><dt><b>版本:</b></dt><dd>1.0.0 </dd></dl>
<dl class="user"><dt><b>Revision History:</b></dt><dd>Date Author Revised.Ver Notes<br/>
 2015/5/25 宋伟 1.0.0 file created<br/>
 </dd></dl>
</div><hr/><h2>宏定义文档</h2>
<a class="anchor" id="acc1f411996184aedde8f1a92be9bc337"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_KEY_LEN_MAX" ref="acc1f411996184aedde8f1a92be9bc337" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#acc1f411996184aedde8f1a92be9bc337">APIKEY_KEY_LEN_MAX</a>&#160;&#160;&#160;63</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>APIKey字符串最大长度 </p>

</div>
</div>
<a class="anchor" id="a7b3ee488773fb345fbc2c626f1ee1cec"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_PERMISSION_FLAG_ALL" ref="a7b3ee488773fb345fbc2c626f1ee1cec" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#a7b3ee488773fb345fbc2c626f1ee1cec">APIKEY_PERMISSION_FLAG_ALL</a>&#160;&#160;&#160;0xFFFF</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>所有权限 </p>

</div>
</div>
<a class="anchor" id="aa803f7fd707c28f2cc1c625a3ab98f02"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_PERMISSION_FLAG_DELETE" ref="aa803f7fd707c28f2cc1c625a3ab98f02" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#aa803f7fd707c28f2cc1c625a3ab98f02">APIKEY_PERMISSION_FLAG_DELETE</a>&#160;&#160;&#160;0x0008</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>DELETE权限 </p>

</div>
</div>
<a class="anchor" id="ae675ba5273b60aff7defe5e946bf6dff"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_PERMISSION_FLAG_GET" ref="ae675ba5273b60aff7defe5e946bf6dff" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#ae675ba5273b60aff7defe5e946bf6dff">APIKEY_PERMISSION_FLAG_GET</a>&#160;&#160;&#160;0x0004</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>GET权限 </p>

</div>
</div>
<a class="anchor" id="a3861f1bc9f05b3121553bff99e010300"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_PERMISSION_FLAG_POST" ref="a3861f1bc9f05b3121553bff99e010300" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#a3861f1bc9f05b3121553bff99e010300">APIKEY_PERMISSION_FLAG_POST</a>&#160;&#160;&#160;0x0001</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>POST权限 </p>

</div>
</div>
<a class="anchor" id="a59fa96f8532dba4ba7697728fb7ecc25"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_PERMISSION_FLAG_PUT" ref="a59fa96f8532dba4ba7697728fb7ecc25" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#a59fa96f8532dba4ba7697728fb7ecc25">APIKEY_PERMISSION_FLAG_PUT</a>&#160;&#160;&#160;0x0002</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>PUT权限 </p>

</div>
</div>
<a class="anchor" id="af578ef1448a44667163bac36573338b8"></a><!-- doxytag: member="RFAPIKey.h::APIKEY_TITILE_LEN_MAX" ref="af578ef1448a44667163bac36573338b8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="RFAPIKey_8h.html#af578ef1448a44667163bac36573338b8">APIKEY_TITILE_LEN_MAX</a>&#160;&#160;&#160;31</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>APIKey命名最大长度 </p>

</div>
</div>
<hr/><h2>函数文档</h2>
<a class="anchor" id="ad499d726f56189940d30eecba5e40616"></a><!-- doxytag: member="RFAPIKey.h::RFAPIKey_Create" ref="ad499d726f56189940d30eecba5e40616" args="(RFAPIKeyInfo *keyInfo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 <a class="el" href="RFAPIKey_8h.html#ad499d726f56189940d30eecba5e40616">RFAPIKey_Create</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> *&#160;</td>
          <td class="paramname"><em>keyInfo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>创建APIKey </p>
<dl class="params"><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">keyInfo</td><td>API Key信息，该参数在创建APIKey时只需要tile和permsFlag，key 用于返回创建成功的API Key字符串</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>参考<a class="el" href="OSAErrno_8h.html">OSAErrno.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7337cf1558fd7a297f6943ad4aef0591"></a><!-- doxytag: member="RFAPIKey.h::RFAPIKey_Delete" ref="a7337cf1558fd7a297f6943ad4aef0591" args="(int8 *targetKey)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 <a class="el" href="RFAPIKey_8h.html#a7337cf1558fd7a297f6943ad4aef0591">RFAPIKey_Delete</a> </td>
          <td>(</td>
          <td class="paramtype">int8 *&#160;</td>
          <td class="paramname"><em>targetKey</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>删除指定APIKey </p>
<dl class="params"><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">targetKey</td><td>指定需要删除的key字符串</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>参考<a class="el" href="OSAErrno_8h.html">OSAErrno.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a00193ebdc68a1853599464426eb24f78"></a><!-- doxytag: member="RFAPIKey.h::RFAPIKey_UpdateInfo" ref="a00193ebdc68a1853599464426eb24f78" args="(RFAPIKeyInfo *keyInfo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 <a class="el" href="RFAPIKey_8h.html#a00193ebdc68a1853599464426eb24f78">RFAPIKey_UpdateInfo</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> *&#160;</td>
          <td class="paramname"><em>keyInfo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>更新APIKey信息 </p>
<dl class="params"><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">keyInfo</td><td>API Key信息，跟<a class="el" href="RFAPIKey_8h.html#ad499d726f56189940d30eecba5e40616">RFAPIKey_Create</a> 不同，更新接口还需要用key 参数指定需要更新的目标APIKey</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>参考<a class="el" href="OSAErrno_8h.html">OSAErrno.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aed7a2a64fe8500884ae5be23cdd6a25d"></a><!-- doxytag: member="RFAPIKey.h::RFAPIKey_View" ref="aed7a2a64fe8500884ae5be23cdd6a25d" args="(RFAPIKeyInfo **keyInfoList)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 <a class="el" href="RFAPIKey_8h.html#aed7a2a64fe8500884ae5be23cdd6a25d">RFAPIKey_View</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> **&#160;</td>
          <td class="paramname"><em>keyInfoList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>查看本设备的所有key </p>
<dl class="params"><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">keyInfoList</td><td>返回<a class="el" href="structRFAPIKeyInfo.html">RFAPIKeyInfo</a> 类型的结构体数组指针。用户以“keyInfoList[i]” 的形式进行查看，查看后需自行释放</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>大于等于0 - keyInfoList 中结构体成员个数 </dd>
<dd>
小于0 - 参考<a class="el" href="OSAErrno_8h.html">OSAErrno.h</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated at 2016年六月3日 星期五 09:08:32 for RestfulLinux by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
